﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Faculty
{
    class Faculty
    {
        public string Name;
        public List<Department> Departments = new List<Department>();

        public static Faculty GetRandomFaculty()
        {
            Faculty faculty = new Faculty();
            faculty.Name = "Main Faculty";

            for (int i = 0; i < 5; i++)
            {
                Department dep = Department.GenerateDepartment();
                faculty.Departments.Add(dep);
            }

            return faculty;
        }

        public void PrintFacultyToConsole()
        {
            Console.WriteLine("Faculty Name: {0}", Name);
            foreach (var department in Departments)
            {
                department.PrintDepartment();
            }
        }

        public void PrintStudentsToConsole()
        {
            Console.WriteLine("Введите номер кафедры");
            int number = Int32.Parse(Console.ReadLine());
            Departments[number].PrintStudents();
        }
    }
}
